import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import { checkPermission } from '@/utils/validate'
import '@/utils/permission'
import 'ant-design-vue/dist/antd.less'
import '@/assets/style/base.less' // 自定义全局样式
import 'normalize.css/normalize.css'
import Antd from 'ant-design-vue'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
const app = createApp(App)
// 自定义权限指令
app.directive('permission', checkPermission)

app.use(pinia).use(router).use(Antd).mount('#app')
